home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-12 | 1.3 KB | 58 lines | [TEXT/KAHL] |
- // STATICS.CPP
- //
- // Written by Steve Teale, April 1991
- // Copyright (c) 1993 Symantec Corporation
- //
- // This translation unit contains the code to initialize the
- // standard stream classes, and to set up appropriate ties
- // and defaults.
- //
- // In the case of compilers generating native code there is no
- // need for complicated provisions to ensure that static objects
- // with constructors get initialized before they are used.
- //
- // Library objects are initialized before user objects, The
- // stream classes are currently the only such objects in the
- // libraries.
-
- #include <fstream.hpp>
-
- filebuf __fd0(0, ios::in
- #if M_UNIX_ || M_XENIX
- );
- #else
- | ios::translated);
- #endif
- istream_withassign cin(&__fd0);
-
- filebuf __fd1(1, ios::out
- #if M_UNIX || M_XENIX || macintosh
- );
- #else
- | ios::translated);
- #endif
- ostream_withassign cout(&__fd1);
-
-
- filebuf __fd2(2,0,0, ios::out
- #if !(M_UNIX || M_XENIX || macintosh)
- | ios::translated);
- #else
- );
- #endif
- ostream_withassign cerr(&__fd2);
-
- #if M_UNIX || M_XENIX
- filebuf __fd3(3, ios::out);
- ostream_withassign clog(&__fd3);
- #else
- filebuf __fd3(3,0,0,ios::out | ios::translated);
- ostream_withassign caux(&__fd3);
- #endif
-
-
- filebuf __fd4(4,0,0,ios::out | ios::translated);
- ostream_withassign cprn(&__fd4);
-
- static IosTie _(&cin,&cout);
-